Building Occupancy Sensor Network

ABSTRACT

A system for detecting and identifying occupants of rooms in a building works with an application allowing configurable control and actuation of various controller and actuators around the building and easy configuration of short range communication devices.

RELATED APPLICATIONS

This application claims the benefit of and priority to ProvisionalPatent Application No. 62/021,635, filed Jul. 7, 2014, incorporated byreference herein.

TECHNICAL FIELD

This application is directed, in general, to systems and methods forfacilitating and managing operation of communications-enabled devicesinside of a building. It is a part of what is commonly referred to asthe Internet of Things (IoT).

BACKGROUND

The recent proliferation of the communication-enabled devices requires alarge amount of data being transferred to and from these devices. Whenlocated inside of the building these data can be transferred over acommunications network of the building. In most current applications,the communications-enabled consumer devices connect to the Internet viaa local network, either wired, or wireless.

While the current approach of using one network in a home or smallbuilding suffices when there are only a handful of devices communicatingwith the Internet, such as computers, tablets, thermostats and otherlarge appliances, this solution quickly becomes insufficient andineffective with the proliferation of number of the devices trying toaccess the Internet from inside of a building. Large number of devicesaccessing one local area network (LAN) increases the burden on thisnetwork and its router to appropriately divide the network resourcesamong all network nodes. A significant portion of time is spent inswitching the communications from one device to another. This isespecially prevalent in the wireless networks, where it is usuallyimpossible to have multiple devices sending data at the same time andnot interfering with one another.

In addition to this, the cost of adding a device to a local wireless orwired network is significant and can be an economical barrier to itslong-term, large-scale, successful deployment. In addition to thecomponent cost, there also is an energy cost associated withbroadcasting relatively wide-band wireless signals, such as WiFi signalsbased on a variant of IEEE 802.11 specification. This additional energycost adds over time to the overall cost of ownership of each device andthe entire network.

There is a need for at least a two tiered-solution which allows atrade-off between the total ownership cost of the device and the amountof data it needs to exchange with remote servers on the Internet.

The invention disclosed here aims to provide a solution to this problemby allowing the devices to choose between at least two modes ofcommunication. One network, typically WiFi, is a longer range networkused for exchanging large amounts of data or frequent communication. Theother network has a considerably reduced range, usually allowingcommunications within one room only and thus reducing the power neededand preserving battery life for the devices. A typical example of suchnetwork is a Personal Area Network or Peer to Peer Network, such as onebased on IEEE 802.15.4 family of standards or on any of the variants ofthe Bluetooth specification, in particular Bluetooth Low Energy.

Another common trend in modern buildings is to make them intelligent—socalled smart homes or smart buildings are becoming more prevalent andallow users to control various aspects of the building via the localcommunication network (usually WiFi or IEEE 802.15.4 based). Theseinclude programmable thermostats, garage door openers, alarm systems,etc.

These new communication-enabled devices provide the owners the abilityto control the respective aspects of the building when operatingremotely and as such have proven very useful. They do, however, have arelatively limited capability on their own. Their true power can only berealized when coupled with an intelligent building management systemthat anticipates the needs of the building occupants and acts to satisfythese needs without the need of special interaction from the user.

Such system relies on sensors to detect presence of people or animals inthe building by using various modes of occupancy detection. Mostprevalent in use are the occupancy sensors that are very effective atdetecting a presence of a person in a room. Their greatest shortcomingis the lack of the ability to identify the person in the room—theycannot usually tell one building occupant from another or whether theperson detected should or should not be allowed in the part of thebuilding the sensors are installed in.

It is therefore an aspect of the presented invention to facilitate thedetection of the identity of the building or room occupant to enablemore intelligent building control.

Another aspect of the presented invention is the combining of thecommunications hub with the occupancy identity detection to improve theoperation of the automated intelligent building control.

Finally, one more aspect of the presented invention allows for seamlessand secure installation and operation of wired and wireless clientdevices on the building communications network.

SUMMARY

One embodiment includes an occupancy tracking communication networkcomprising at least one hub device and one communication aggregationdevice where the hub device is enabled to communicate in two differentmodes—a short range and a longer range to facilitate an energy efficientInternet access for client devices on the short range communicationnetwork via the longer range network. The network of hubs thus allowsthe Internet access for the client devices anywhere in the building.

Another embodiment involves a method of installation of the buildingoccupancy tracking network in a building.

One more embodiment involves a convenient and secure method ofinstallation of a client device on the building occupancy trackingnetwork.

Yet another embodiment involves a method of installation andconfiguration of the building occupancy tracking network including anupload of a three dimensional building room maps into the network'soccupancy sensors.

BRIEF DESCRIPTION

Reference is now made to the following descriptions taken in conjunctionwith the accompanying drawings, in which:

FIG. 1 depicts one illustrative and non-limiting embodiment of aoccupancy-aware network hub with its various sub-components;

FIG. 2 shows an example model embodiment of the write protection circuitof a network hub;

FIG. 3 presents an example of a front view of the presented network'shub;

FIG. 4 illustrates an example building with an example implementation ofthe proposed occupancy tracking network;

FIG. 5 shows a flowchart of a method to install the network ofoccupancy-aware hubs;

FIG. 6 introduces a flowchart of a method to recognize persons fromimages in a occupancy-aware network hub;

FIG. 7 presents a flowchart of a method to recognize and locate a soundsource in a room relative to the position of the occupancy-aware networkhub;

FIG. 8 illustrates a flowchart of a method to determine currentoccupancy in a room with an occupancy-aware network hub.

DETAILED DESCRIPTION

The FIG. 1 illustrates an example embodiment of a device 100 of thepresented disclosure. The device is equipped with a Central ProcessingUnit 101, working with volatile memory 102 to store in it the temporarydata and with non-volatile memory (NVM) 103A to store there the datathat needs to be retained after the power reset of the device andmultiple device power cycles. Furthermore, the CPU 101 works with thenon-volatile memory 103B to store there the program that executes on theCPU. For those skilled in the art, it is apparent that the non-volatilememories 103A and 103B can in fact be the same memory contained withinone chip package. For the purposes of some of the novel aspects of theinvention, a differentiation is made here to separate the two memories.The one non-volatile memory 103A used for storing data only can bewritten and read to at any time. In contrast, the non-volatile memory103B, used for storing the program executed by the CPU, can be connectedto the User Interface 104 to facilitate write protection, so that theprogram (firmware) updating of the device 100 can only happen with theexplicit user consent facilitated directly at the device 100 with thehelp of its User Interface 104. It is also obvious for those skilled inthe art that both memories 103A and 103B, as well as 102 can becontained within the same chip package as the CPU 101 in a devicecommonly referred to as a microcontroller. Conversely, the sameprinciple of operation applies to a CPU that is separate from memories102, and/or 103A and/or 103B, commonly referred to as a microprocessor.

It should be noted that the CPU 101 can be implemented as a conventionalmicroprocessor or microcontroller, or a Digital Signal Processor (DSP)or a Field Programmable Gate Array (FPGA) or any combination of these.It should not be considered a limitation of the disclosed invention whatcomputing platform it uses, as long as it is embedded onto the device.

The User Interface 104 of the device 100 consists of two components—aninput component and an output component. The input component could be asimple single button on the device 100, a communications interface toanother device that contains such simple button or a sophisticatedkeypad or touch screen, or anything in between.

The output component of the User Interface 104 of the device 100 can bean audio or visual response indicator, such as a light or set of lights,a beeper/buzzer, a speaker, a display, a communications interface toanother device that contains a response indicator, or any combination ofall of the above.

The device 100 further comprises of number of N sensors 105-1 through105-N. These sensors can be of various types, including temperature,humidity, light, and passive infrared type. Audio range microphones,extended frequency range microphones and optical sensors such as visiblespectrum cameras or infra red (IR) cameras or three dimensional imagingcameras can also be employed as sensors.

To support the three dimensional imaging of the sensor there can bemultiple optical cameras used (e.g. to support stereovision), as well asa structured light 3D sensor, or a time of flight (ToF) 3D sensor, orany combination of these sensors.

Cameras may be coupled with supporting sensors and actuators, a typicalexample would be a single infrared light source, such as an infraredlight emitting diode (LED), or an array of such LEDs. Visible light LEDsand lasers can be used as well.

The next component of the device 100 is the Long Range Communicationsmodule 106 typically used as a medium to connect to the Internet. Thecircuit consists of the electronics needed to receive, modulate, anddemodulate the wired or wireless signals. These long-range communicationsignals can also be encoded, decoded, encrypted and decrypted by eitherthe Long Range Communications module or the CPU 101. Themodulation/demodulation, encoding/decoding and encryption/decryption canbe performed in hardware or in software or by the most advantageouscombination of both running either on the long range communicationsmodule or the CPU or the combination of both of these hardware units.The typical long range communications module is a wireless chipsupporting any combination of variants (e.g. 802.11a, 802.11ac, 802.11b,802.11g, 802.11n) of the IEEE 802.11 wireless local area networkspecifications. These standards usually offer higher robustness andbetter through-wall communication capabilities than other wirelessprotocols, especially in the globally available 2.4 GHz spectrum. Theycan also operate in other frequencies, such as the 5.0 GHz band.

In addition to, or as a replacement of the wireless communications, thelong range communications module can include a wired communicationcomponent, such as one supporting Universal Serial Bus (USB), Broadbandover Power Lines (BPL) through any of the IEEE 1901-based standards, orEthernet (IEEE 802.3-based) communications.

The device 100 with all its components is powered by the power supply107. The power supply takes one type of input voltage and translates itinto the power supply needed to power all device components. Typically,the input to the power supply 107 is a battery and/or the batterycharging system. In some applications the input may be an output of thewall wart, USB charger, or even the AC power delivered straight from thebuilding's AC outlet.

Finally, there also is a Short Range Communications module 108. Themodule serves to communicate wirelessly to other devices within thevicinity of the device. In typical applications, this means deviceslocated within the same room as the disclosed device itself. The shortrange communication is usually based on the existing standard wirelesscommunications, such as the ones based on IEEE 802.15.4 standard or onthe Bluetooth wireless communications family of standards. Typicalstandards include Zigbee, 6LoWPAN and Bluetooth Low Energy (BLE).

In addition to, or as a replacement of the wireless communications, theshort range communications module can include a wired communicationcomponent, such as one supporting RS-232, RS-485, Controller AreaNetwork (CAN), Digitally Accessible Lighting Interface (DALI), Ethernet,Universal Serial Bus (USB), optical fiber or other proprietary orapplication-specific interface such as Apple's Lightning interface. Sucha wired communication link can also be used to power the end devicethrough the communications hub, minimizing wiring effort and improvingenergy efficiency.

An important function of the disclosed device is ability to facilitateexternal network access to the client devices on the short rangecommunication network, via the device's long range communications module106. As such, the device 100 acts as a network hub enabling multipleclient devices communicating with it via short range communications toexchange data over the long range communications. Typically, the shortrange communications enabled client devices exchange data with serversthat contain their configuration, collect, process and store their usageand diagnostic information and provide them with firmware updates. Insome applications, the servers can influence the behavior of the clientdevice by issuing control commands to it. Such commands are carried overthe Internet, over the building's long range communications network, viathe Long Range Communications module 106 to the device 100. The device100 then sends these commands out via its Short Range Communicationsmodule 108 to the client device.

This arrangement allows for these client devices to have the best ofboth worlds—be battery powered and thus portable and/or easy to install,and be able to communicate via the Internet. Typically, this is notpossible for devices that operate on wireless local area networks due tothe energy footprint needed to communicate on these networks. Thetypical 802.11 based communication requires a channel bandwidth of over20 MHz, whereas the 802.15.4 based protocols require a channel bandwidthof only 2 MHz. This translates directly into power usage. The devicethat has to transmit a signal that is 20 MHz wide is going to expendmore energy doing it as the device doing the same (at the same outputpower density) at 2 MHz wide channel. In practice, this is compensatedfor by the increased data rates of the IEEE 802.11 based protocols. Thisallows these devices to send the same amount of data in a shorter timethus having better efficiency per data bit communicated wirelessly. Onthe receive side, however, these differences cannot be typically easilyovercome. This is because a wireless device usually spends more timelistening to other wireless devices on its network than the time itspends transmitting out its own data.

Additionally, the IEEE 802.11 based protocols are designed to transportlarge amounts of data over as large of an area as possible, whereas thelow power networks, as the name implies, are designed to optimize theenergy usage and trade it off for their effective range. As a result thelocal area wireless networks are usually allowed a much higher transmitpower limits and thus expend more energy when communicating than the lowpower network devices do.

Many possible energy optimization techniques are typically employed topreserve the energy stored in the client device's battery and thusextend its useful battery life. They do not change the basic principlethat short range communications typically use less energy and allow forlonger battery life operation.

There are two major components to a wireless communicating clientdevice's power usage—they are the total power needed while communicatingand the sleep mode power usage. The amount of energy expended over timetranslates into battery life of the device—the more energy the deviceuses over time, the shorter it's battery life.

To make the client devices commercially viable, it is critical to designthem in such a way that their battery life is as long as possible,usually many years. The design goal is for these devices to last so longthat it is the battery's life expectancy that limits the effectivebattery life, not the state of its charge over time. Lithium ion andlithium-polymer batteries usually have a life expectancy of 3-5 yearsand more and therefore it is the design goal for each battery-powereddevice to make sure that during its anticipated usage, it consumes powerfrom its battery at a pace slower than 20% a year.

Some client devices can be further equipped with large capacity energystorage and an energy harvesting circuitry. This allows extending theirbattery life to match the product's physical and electric product life,which is often 10 years and more.

The use of the low energy network for local, in-room communicationsallows devices to limit the amount of energy expended when theycommunicate with another network node reducing the power usage of thefirst critical component of the energy efficiency. The use of specificsystem solutions and low-duty cycle communication protocols allows forthe maximum extension of the sleep mode to address the second criticalcomponent of a device's total energy efficiency characteristic.

One system solution allowing for energy-efficient low duty cyclecommunication of client devices on the local in-room communicationnetwork is the use of a store-and-forward communication scheme where thecommunication hub will store and buffer messages coming from either theInternet or the in-room network itself until an addressed in-roomnetwork node wakes up and polls the communication hub for new data. Tominimize overall Internet-bound network overhead some systems may alsouse a store-and-forward communication scheme to consolidate messagesdestined for the Internet that are received by the communication hubwithin a certain time window. Such an outbound store-and-forward schememay be limited to a subset of all messages, or may be applied to alloutgoing Internet traffic.

Another very important feature of the disclosed invention is themulti-faceted security provided to the building owners and occupants.This includes encryption of the data stored on the device 100 andencryption of its operating software or firmware (in general referred toas program code). The software encryption mechanisms can serve as a verypowerful deterrent to hackers trying to take possession of the system.Since the proposed invention includes sensors that can be potentiallyused to eavesdrop on the building occupants there is a need for the moststringent security measures possible. One such very secure mechanism isprovided via the dedicated link 110 from the User Interface 104 to theNon-Volatile Memory—Program 103B.

The dedicated line 110 serves as an additional security feature of thedevice and prevents reprogramming of the device's program code withoutdirect user intervention. This implies that in addition to software andsystem security alerting the network administrator about thesoftware/firmware update of the device 100 (and requiring his consent),a physical action is required at the device itself to perform theupdate. A typical embodiment of such action is pressing a button for aperiod of time and/or in a predefined pattern, or typing a password onthe user interface (if equipped with optional keypad or touchscreeninterface). Such action then energizes the temporary hardware circuitthat unblocks the activation of the write cycle to the Non-VolatileMemory-Program 103B memory.

An example embodiment of such security circuit is presented in FIG. 2.The security circuit 200 is logically located between the User Interfacecircuit 104, the CPU 101, and the Non-Volatile Memory—Program 103B. Inthe presented, non-limiting example embodiment, the security circuit isfurther composed of a monostable circuit 201 with its output active lowand the OR logical gate 202. The CPU's output Write signal is alsoactive low. The Non-Volatile memory 103B cannot be written to unless itsWrite input is driven low by the controlling chipset. Thus, whenoperating normally, the monostable circuit's 201 output is always inhigh logical state preventing the output of the gate 202 from ever goinglow thus not allowing the memory to be written to at a physical chiplevel. It is only when the User Interface 104 (at least temporarily)actuates the input to the circuit 201 where the output of the monostablecircuit is driven low thus allowing the CPU originated control signal topropagate freely to the write input of the Non-Volatile Memory—Programcircuit 103B, thus allowing it to be written to.

In the presented example the User Interface 104 could be a simple buttonthat is temporarily actuated, say with a single press. Then, themonostable circuit 201 generates a logically negative output pulse witha predefined duration. The duration of the pulse needs to be long enoughto allow the CPU to program the memory and short enough not to allow ahacker to take control of the device. If it takes N seconds to reprogramthe NVM 103B than it is a good practice to limit the durationt_(Duration) of the pulse to anywhere in between N and 2N(N<t_(Duration)<²N), the closer to N the more secure the operation. Itis understood by those skilled in the art that the presented example isa simplification of actual implementation of the circuit. In particular,the CPU may be sensing the output of the User Interface 104 and/or theMonostable Circuit 201 to determine when to start the write operation tothe NVM 103B. The write signal may be active low as presented or activehigh, in which case the simple logic of the circuit is modified toinclude a logical AND gate in place of the OR gate 202 and the output ofthe Monostable Circuit 201 is active high. Similarly, there is nolimitation on the type and number of signals buffered. A morecomplicated logic could be employed to achieve the same result oftemporarily enabling memory writes with help of local user actuation.The logic could employ the use of other control signals such as ChipEnable, Output Enable, Write Enable, Write Protect, etc. The device maybe further equipped with multiple NVMs and an equivalent scheme may beused on any combination of them including all of them.

The hardware protection approach is just a part of the enhanced securityof the presented device and the system. There are other important partsof the overall design approach that further validate the users andnetwork administrator of the device and the overall building controlsystem and prevent unauthorized access.

The example embodiment of the front plate of the disclosed device isshown in FIG. 3. The front plate 300 of the device 100 is what isexposed to the building occupants. The simple user interface button 301is preferably located near the center of the device and allows physicalpressing of it by the building occupant. However, the physical shape orlocation of the button is not to be considered a limitation of theinvention. The device is further equipped with sensors 302, 303, 304 and305 as well as the light ring 306 and the power interface 307, allmounted on or near the front of the device 100.

The sensors 302 and 303 are imaging sensors defined as array sensorsreturning a two or three-dimensional representation of the image seen bythe sensors. Thus their assembly normally includes the lens, the sensoritself and optionally the light sources to illuminate the scene. In caseof a camera imaging sensor the light source could be an infrared orvisible spectrum LED allowing the camera sensor to take pictures atnight or in low ambient light conditions. In case of a 3D imagingsensor, such as the Time of Flight sensor or the Structured Light sensorthe infrared LEDs or projection lasers can be used. In general, anyimaging sensor with its supporting circuitry can be used. The activeillumination LEDs and or lasers may be mounted close to the sensor 302and 303 or anywhere else on the device 100, preferably close to thefront plate 300.

In the preferred embodiment the sensors 302 and 303 include at least onetwo dimensional camera sensor. The other sensor could be a 3-D sensor oranother two dimensional camera including another CMOS (or CCD, or anyother technology) imaging camera or an IR camera. These two sensorsoperate to generate an image of the scene in the room the device islocated in. While it is preferred that both sensors 302 and 303 areused, it is not necessary and other considerations, such as the cost ofmanufacturing of the device may outweigh the benefits of employing both.At the very least, one of these sensors is used, but even its use can beoptionally disabled.

Since 302 and 303 are imaging sensors, it may be undesirable by thebuilding occupants to have them enabled in certain rooms of thebuilding, for example in bathrooms or bedrooms. Therefore it is anotherfeature of the presented invention that these sensors can be configuredto be disabled when the disclosed device 100 is placed in a roomrequiring occupant's privacy. The disabling of these two sensors can beaccomplished in software or in hardware. In case of the hardwaresolution, the device user interface 104 is equipped with a mechanicalselector switch that allows the sensors to be disabled. The selectorswitch could indicate the type of room the device is located in (such asbathroom or bedroom, or a living room, or a conference room) or simplyswitch between different levels of privacy mode from the lowest to thehighest. The preferred location for such a mechanical switch is on the(wall facing) back or side of the device.

The device 100 may be further equipped with a motion sensor 304. This istypically a Passive Infra-Red (PIR) sensor and preferably at least adual mode PIR sensor allowing not only the detection of motion in theroom, but also the direction of the person's movement from right to leftof the device or the other way. This sensor is typically always enabledand coupled to the interrupt circuit of the CPU 101 allowing the device100 to spend most of its time in low-power mode and only waking up itsimaging sensors when the motion is detected by the sensor 304.

The device 100 is further equipped with audio and/or extended rangemicrophones 305A, 305B, 305C and 305D. While it is not necessary to haveall four sensors, the use of multiple microphones allows for anapproximate geospatial identification of the origin of the sounddetected by the microphones through signal phase difference measurementand other types of signal processing and can help aid the recognition ofa person or an animal in the room. As such it is preferred that thesensors are positioned in specific locations with respect to each otherto help facilitate exact sound source location. Four is the preferred,but not the maximum amount of microphones that can be used. A largernumber of sensors, often with varying gain settings or frequencycharacteristics can be used. The number of actual sensors is acompromise between the quality of the recognition of individual soundsources and the device, hence total system cost.

The microphones can also be used to detect relative location ofdifferent devices 100 in the same building and help the system build ageospatial model of each room and the whole building. The use of themicrophones can be limited or disabled at higher privacy settings of thedevice.

The light ring 306 is one preferred way to indicate device actions tothe local building occupant. As such, the ring is equipped with multiplemulti-color light sources, preferably LEDs that allow the device toconvey different messages by turning on different lighting patterns thatcan vary in color as well as in timing. The lighting ring is only oneexample of such light indicator and other shapes and forms ofmulti-light source can be used. For example, the light indicator can beof shape of a circle, line, rectangular or a three-dimensional shape asrequired by the esthetics of the design of the device.

Finally, a power interface 307 allows the device to be powered from anexternal source such as a PC, a household appliance, wall wart type ACadapter, or any other external power source. The power source can becoupled in via a wired connection such as USB, Lighting connector,Ethernet, etc. or it can be coupled in wirelessly.

The device 100 may further be equipped with a temperature and humiditysensors to allow it detect the type of the room it is installed in,based on temperature and humidity levels detected by other sensors 100in other rooms of the building. The data collected by these sensors canbe used to detect occupancy as well as to improve efficiency of heatingand cooling of the room and for any other purpose.

FIG. 4 shows an example implementation of the network of disclosed hubs.The building 400 consists of four rooms 401, 402, 403 and 404. There arefour occupancy sensing hubs in the building—one in each room—the hubs411, 412, 413 and 414 are located in rooms 401, 402, 403 and 404,respectively.

While it is preferred that the hubs 411 through 414 include theoccupancy tracking sensors in the same physical device, it is not arequirement. It should be understood that when referred to, theoccupancy sensing hubs 411 through 414 may be single devices comprisingboth network communications hub functionality with the occupancydetection and identification capabilities. In some applications, it maybe advantageous to separate these two functionalities into two separatephysical devices—one device being the network communications hub and theother being the occupancy tracking sensor that is communicating with itsrespective communications network hub over the short or long rangecommunications network. For the purposes of this application whenreferred to as the occupancy sensing hubs, the hubs 411, 412, 413 and414 can each be one single physical device, or they can each be acombination of two physical devices separating the networkcommunications hub functionality from the occupancy sensing andidentification functionality.

The building has two external doors 421—in the room 401 and 422 in room404. There are three internal doors in the building—door 431 leads fromroom 401 to the room 403, the door 432 leads from room 402 to room 403,and door 433 leads from room 403 to room 404.

Hubs 411 through 414 form a network of hubs and connect to the localarea network via an access point 450. While the presented embodimentshows the local area network to be wireless, there is no restriction onwhat medium is used. Any combination of wired and wireless networks canbe used with the main goal of the network being allowing the devices onthat network access to the Internet and possibly each other. Thepreferred embodiment for the local area network is a network based onthe IEEE 802.11 specification, commonly referred to as the WiFi network.

The network hubs work with an application running on the occupancynetwork controller 460. Together, network hubs 411 through 414 and theoccupancy network controller 460 form the occupancy tracking network.The occupancy network controller could be a standalone device or it canbe a software device incorporated into one of the hubs. It can also be adedicated home automation controller, such as a Crestron Control System,AMX NetLinx controller, Siemens building controller or the like. It canalso be an application running on a dedicated local or remote computer.An example of such application is one running on a local tablet computerthat utilizes Apple's HomeKit framework to control appliances around thebuilding. In general, the occupancy network controller 460 isresponsible to translate the occupancy data into meaningful actions thatcan be real-time (such as turning on the lights or a light profile asthe recognized person enters the room) or log-based—allowing the loggingof the event of detecting a specific person entering the room or thebuilding.

It is important to note that the network controller 460 is implementedas software or firmware on a physical device, but does not have to betied to exactly one piece of hardware. It can be incorporated into otherhardware, such as any or all of the occupancy-aware network hubs 411through 414, any other piece of hardware present within the building orremote from it. What defines the network controller 460 is only whatfunction it performs, whether standalone or part of or in addition toany other functionality it may perform.

One example embodiment is for the occupancy network controller 460 totrack the attendance of various employees in a commercial building. Theemployees are not required to sign/log in when they enter the buildingand sign out when the leave—the system logs their coming in and leavingactivity automatically. This allows for greater accuracy of time keepingby eliminating human error. In this embodiment, the occupancy trackingnetwork controller communicates with the server running the attendancetracking application, such as AttendanceOnDemand, TimeForce, etc. torecord the times of entry and exit of each tracked employee.

The system works by identifying the person who enters the building, saythrough the door 422. The hub 414 can detect the identity of the personby means of sound or image recognition as well as by picking up thewireless signals emitted from the device the person carries. If theperson carries a smart device, such as a smart phone or tablet, aconnected (wrist) watch, a bracelet or any other wearable deviceincluding medical devices, the person can be then identified by thehub's 414 wireless receivers. These receivers measure the RelativeSignal Strength Indicator (RSSI) of all detected wireless transmittersand match the radio frequency signatures of these signals to the knowndatabase of smart devices. The data used to identify the device includesthe device MAC address and may include its serial and part numbers andany other data that useful in identifying the device. The database ofsmart devices may further contain the identity of a person that owns thesmart device, so the inference is made by the occupancy sensing hub 414that there is a high probability that the person who entered the room404 is the owner of the device whose RSSI indicates close proximity tothe hub 414.

The mentioned database may be located in the occupancy networkcontroller 460, on a local or remote server, or in the hub device 411itself. It is a feature of the disclosed system that the association ofthe person with the smart device may be learned from the previousencounters with the person by any other hub in the system and stored inthe database. In other words, all hubs may learn association of peoplewith their smart device wireless signatures based on the positivefeedback from the network administrator. The feedback provided by thenetwork administrator to the network of hubs, or each hub separately maybe in form of a picture, or a set of pictures, and voice samples of eachknown building occupant. If such pictures and voice samples are notavailable, the system may prompt the network administrator to identify aperson not yet known to the system.

The reference pictures may be obtained by the system itself, from one ofthe system's cameras, or from any other source. An internal database ofpictures of the building occupants may be used, or the pictures can beimported from various social networking sites such as Facebook, Google+,LinkedIn, etc.

Each hub identifies each detected room occupant based on the feedbackfrom multiple sensors, including the imaging sensors, the microphones,the wireless signatures and RSSI measurements, etc. Each one of thesesensors generates a confidence coefficient—a number representingprobability that a detected person is a known person in the database. Anadditional confidence measure comes from sensors from other rooms. Forexample, if the building occupant leaves the room 404 through the door433 and moves on to the room 403, the occupancy detector hub 413 mayconsider the input (in form of the confidence measure) from the hub 414identifying the person leaving the room 404 and entering the room 403.In absence of high confidence level of its own measurements, theoccupancy sensor 413 may use the confidence levels received from sensor414 and all other sensors in the building to determine the identity of aperson in room 403. This is achieved by exchanging the confidencecoefficients of detected persons between different occupancy detectorhubs together with attributes describing the person. The attributes mayinclude the representation of the current clothing of the person, suchas what type and color of clothing he or she is currently wearing, anyhead coverings, presence of glasses, shoes, whether the person iscarrying something or somebody, etc. These additional attributes arethen used by the other occupancy detectors to further increase their owndetection confidence coefficients.

In another embodiment, it is the application running on the occupancynetwork controller 460 that determines identity of a person in room 403based on the input and confidence measures from other sensors in thehouse. It is of secondary importance where the identity detectionalgorithm resides on the network, as long as it has the access to datafrom multiple occupancy sensors, such as 413 and 414.

An important aspect of the presented invention is ability to trackanimal or specific people movements within the building. In case oftracking an animal or any other known person the occupancy network maywork with an associated alarm system and disable the alarm based on thepresence of the known animal or other person in a room. Instead of thealarm going off on detection of any movement, it goes off only ondetection of unknown person's movement. The movement of the animals andall persons in general from room to room is tracked by the occupancynetwork with the described algorithm exchanging information about peopleor animals moving from one room to another.

Another particular embodiment of the presented invention is trackingthat the known person is still confined to be within a room or a numberof rooms (or even outside of the building in a fenced off, or otherwiserestricted area). In such case when the person is not detected with apredefined confidence level for a predefined length of time, the systemmay prompt the person to approach one of the occupancy sensors todetermine that the person is still present in the room he or she waslast detected in or could be in, or it may trigger a set of other,application level actions, such as alarming the network administrator orsystem supervisor that the person may not be there or may not be movingor reacting to system prompts.

The occupancy-aware network hub's 411 through 414 perform their hubfunctions by allowing the client devices 441 and 442 the access to thebuilding's LAN and through it, the Internet. There are no restrictionson what constitutes a client device—it can be a device that is fixed atone location, confined to a room of the building, or moveable all aroundthe building and outside of it. Client devices are typically equippedwith short-range communications only and are normally restricted on theamount of power they can expend to communicate, often they arebattery-powered.

For the devices that are fixed to a room or collection of rooms of thebuilding an important feature of the invention is to allow them to bequickly assigned to the specific room. This can be accomplished with thehelp of bar-code label, Near Field Communications (NFC) tag, or the likeaffixed to the client device. The bar-code could be any type of a linearor two dimensional matrix code.

The method to assign such a device to the room is to use a smart-deviceapplication that allows for the scanning of the label or the NFC tag (bymeans of either taking a picture of the bar-code or tapping the NFC tag,respectively). The application may then proceed to assign the device toa room as defined by the system during installation by communicatingwith the occupancy-aware network hub or the network controller 460, orit can be done automatically when the occupancy network knows which roomthe smart-device is in while taking the scan of the client device.

A similar smart-device application can be utilized in installation ofthe network of occupancy-aware network hubs. In particular a smartdevice equipped with a 3-D scanner, such as Google's Project Tangodevice, Amazon Fire phone, etc. can be used to scan the rooms of thebuilding and upload the 3-D maps of the rooms to the occupancy networkhubs or the network controller 460. The upload can happen during thescanning—using the “live upload” method, or after the room or rooms havebeen scanned—using the “delayed upload” method. In the case of the liveupload the occupancy sensor can get the data streamed to it directlyfrom the 3-D scanning smart device via the short-range or the long-rangecommunications network. The assignment of the 3-D map to each room maybe done via a selection in the smart-device application orautomatically, when the location of the 3-D scanning smart-device isdetected by the occupancy sensor network.

In case of using the delayed upload method the data collected from eachroom can be uploaded to the network hub over a short-range or long-rangecommunications network either directly from the image collecting device,or through the occupancy network controller 460. In such a case, theapplication running on the occupancy network controller 460 allows forthe upload of the data to it and identification of which room of thebuilding the data belongs to.

An important aspect of the disclosed invention is the combination ofsecurity and ease of use of the occupancy sensor network. To simplify,yet keep secure, the installation of a client device 441 on the networkin the building 400, the system utilizes a multi-step approach. First,optionally, the system has to detect the presence of an authorizedperson (e.g. system supervisor) in the room 401. Then, when the newdevice 441 is powered up it starts broadcasting its messages over thewireless short or long-range (wireless or wired) communication network.The hub 411 receives the message from the client device. This messagecontains data about the client device 441 that uniquely identifies it.This may be a simple text string with the device name and serial numberor any other suitable identification data. The hub then checks if thedevice 441 is already known and allowed on the network. If no suchrecord is found, the hub 411 contacts the occupancy network controller460 to determine if this client device is already allowed on the networkor not. If the occupancy network controller 460 determines that theclient device is new to the network, it then sends a message to thesystem supervisor requesting the confirmation of the new device'sidentity. Such message contains data retrieved from the device uniquelyidentifying it. To send the message to the system supervisor, a numberof platforms may be used, such as email, SMS message, voice call or anyother messaging platform.

Messaging platform used may be any dedicated message exchange platformsuch as email, Skype, WhatsApp, iMessage, Twitter, SnapChat, etc. In thepreferred embodiment a real-time messaging platform is used, but use ofother messaging platforms is also possible.

System supervisor is any user of the network with a minimum set ofconfiguration privileges, such as allowing new devices to be allowed onthe network. The system supervisor is usually limited to managingdevices on the network once the network has been installed andinitialized. A network administrator has access to all configuration anddata of the network and it he is able to install, uninstall, initialize,upgrade software, add network functionality and perform any taskassociated with the running, maintaining and operating the network.System supervisor is a network user with more limited set of privilegesthan a network administrator. Any network administrator is also a systemsupervisor, but not every system supervisor is a network administrator.In a residential building an example of the network administrator may bethe head of household and the system supervisors may be any other adultliving in the household. In a commercial environment the systemsupervisor may be a team or building manager and the networkadministrator may be the Information Technology (IT) administrator orDirector of IT.

The ease of installation of the disclosed occupancy-aware sensor networkis a critical aspect of the presented invention. The method 500 ofinstallation of the network of occupancy-aware network hubs is shown inFIG. 5. The method starts in locus 501 and proceeds to step 502 wherethe at least one new occupancy-aware network hub is physicallyinstalled. The hubs need to be mounted or placed in locations wheretheir sensors have a good direct view of the room they are installed in.In embodiments where they are powered with an external power source,they need to be mounted in a location that allows connecting to thispower source. The sensor are then powered up and added to the local areanetwork in step 503. If the hub is connected to the LAN via a wiredconnection, usually just plugging it into the network suffices. If theLAN is wireless, the hub needs to be associated with or added to thenetwork.

There are many different methods to add the hub to the wireless LAN. Ifthe wireless network hub is equipped with the WiFi Protected Setup(WPS), any of its methods can be used. Another way to add the hub to thewireless LAN is to first pair it up via Bluetooth to a smart devicerunning an installation application and then using the installationapplication to enter the network's password into the hub's configurationthus allowing it to communicate on the wireless LAN. There are othermethods possible and it should be understood by those skilled in the artthat the choice of a method is not a limitation of the presentedinvention.

Once the hub is connected to the network it starts to listen to messagesfrom other hubs and broadcasting its own messages while measuring theRSSI of signals from other hubs. It uses the measured RSSI and the RSSIof its own signal measured by other hubs on the network to locate itselfand identify hubs in close proximity. When a new hub is detected on thenetwork in method step 504, all other hubs may enter a configurationmode in step 505 and remain in that mode until all are taken out of theconfiguration mode by the network administrator or a timeout is reachedin step 506. When the timeout is reached and not all hubs have beenconfigured, the network may operate only with the hubs that have beenproperly configured.

In the next step 507, once the hubs have been admitted to the wirelessLAN and are in the configuration mode, the network administrator maywalk through the building approaching all hubs, one at a time andoptionally pressing the button 301 on each hub. The hubs learn from thesequence of the appearance of the network administrator (and/or from hisoptional button presses) the topology of the building and which hubs arein close proximity to one another. This data, combined with datameasured through the wireless signal reception measurements is used bythe hubs and/or the occupancy network controller 460 to infer thetopology of the building.

Once the network administrator has visited each hub at least once withinthe allowed time in step 508, the configuration mode is successfullyconcluded in step 509. If the timeout is reached, the method results incorrect configuration of only those hubs that have been visited (andoptionally whose buttons 301 were touched) by the network administrator.

To facilitate the detection and identification of the room occupants,the device makes use of all of its sensors. The PIR and infrared sensorsor sensor arrays can only be used to detect individuals moving around inthe room, but the other sensors can be used to both detect and identifythe presence of people or animals in the room.

Persons and pets can be recognized based on their image as retrieved bythe imaging sensors 302 and/or 303, mostly the visible light cameras,and by the sounds they make as recorded by the microphones 305A-D.

There are several techniques that are used in recognizing individualsfrom the images captured by sensors 302 and or 303—facial recognition,side recognition, body shape matching and gait recognition. Thesetechniques require different levels of complexity from the softwarestored in the program memory 103B and put different strain on the CPU101.

In case of facial or side recognition, a single captured image is usedto find and recognize the faces in it. As such, the captured image isusually first processed with a facial detection algorithm to identifyall the faces in the image and then with facial recognition algorithmsto identify who these faces belong to. Side recognition works the sameway with the difference being that for the facial recognition, a subjectis directly facing the camera such that both of his or her eyes can bevisible by the camera and in the case of side recognition, the face isturned further away from the camera and as such, usually, at most oneeye is visible by the camera.

Body shape matching relies on various measurements of different bodyparts, as seen by the camera. Specific ratios of different body parts'length, width or height is measured and compared against another bodypart of the same individual. This ratio uniquely identifies people andcan be used to recognize them. For example, the head width in relationto shoulder width can be used, as well as overall body height inrelation to the leg length is used, etc. There are many different aspectrations that are calculated and it should be obvious to those skilled inthe art that no particular ratio should be excluded from the scope ofthis disclosure even if not explicitly enumerated.

In some cases, the body shape recognition requires the knowledge of thedistance to the person from the imaging camera, so in these cases a 3-Dsensing technique or another way to measure the distance to the personbeing recognized needs to be used. Examples of such measurements areheight of a person, their estimated body circumference, their estimatedgirth, estimated weight, estimated shoulder width, etc.

While gait detection is the only one of the aforementioned techniquesrequiring a sequence of images rather than a single image, thereliability of all these techniques is greatly enhanced when the samealgorithms are applied to a known sequence of images instead of justsingle image. In other words, the algorithms used are deployed on anumber of images, were each image can be processed individually tofurther increase the odds of correct recognition, even if therecognition attempts on one or a few images yield a false recognition. Acomplete set of such images is referred to as a single epoch. There canbe a number of images taken in an epoch ranging from one to thousands.The most preferred number is in the range of 1 to 200.

The general outline of the method 600 used to analyze images is shown inFIG. 6. The method starts at locus 601 and continues to acquire a set ofN images in a sequence SV (called an epoch) in step 602. In thefollowing step 603, the method loops over the N collected images tofirst detect all persons in the image in step 604, then recognize thedetected persons in step 605 and finally to calculate the certaintycoefficients in step 606. The certainty coefficient is a number from 0to 1, inclusive, that represents how certain the method is that a properperson was detected and recognized. The value of 0 indicates nocertainty and the value of 1 indicates total absolute certainty that acorrect person was recognized. In practice, the values are in between 0and 1 representing an increasing probability that a correct recognitionwas made. The method ends when all N iterations have completed in step607.

The presented method applies to frontal facial recognition, side facerecognition and body shape recognition techniques. For gait recognitionthe steps 604 through 606 are replaced with one general algorithm stepthat results in a single recognition for the sequence, rather than oneper image acquired.

Another technique used in recognizing individuals is based on the soundscaptured by the microphones 305. The algorithm calculates the distanceto the sound source based on the delay (e.g. phase difference) of soundbetween different microphones. When a person starts to talk, the soundof his voice arrives at the microphones at different times, depending onthe physical distance of the person from the microphones. Only a personstanding ideally in front of the microphone pair, with the same exactdistance to both microphones produces no delay with the sound of hisvoice.

The FIG. 7 shows a method 700 of recognizing the persons based onreceived voice samples. The method starts at step 701 and proceeds toacquire M sound samples from multiple sensors in a sequence SS. It ispreferred that the data acquired in the step 702 is equivalent to anepoch. The method then proceeds to analyze collected samples andidentify all distinct sound sources in step 703, as well as calculateposition of each sound source in the room in step 704. Note that in someembodiments steps 703 and 704 happen virtually at the same time, yet inanother set of embodiments, the order of these two steps can bereversed, but they both are completed before the method moves on to step705 where a recognition certainty for each detected source iscalculated. The method commences in step 706.

The data from the microphones 305 is processed by the CPU 101 or anoptional auxiliary CPU (not shown) and the results showing the angle ofthe person relative to the middle of the sensor are used by the CPU tocorrelate the sounds with the faces detected in the same location by theimaging sensor. It is a feature of the disclosed invention that themicrophones are positioned in a special way relative to the imagingsensor assembly that a correlation between the origin of the sound andthe data retrieved from the imagining sensor can be readily made. Thiscorrelation is then used to aggregate data from the imagining sensorsand the microphones to further increase the confidence coefficient forperson recognition based on the sounds they make and the image or imageset acquired at the same time.

The following formula is used to calculate an estimate of who is in theroom at any given time:

${f\left( {P,t} \right)} = {\sum\limits_{i - 1}^{MeasureCount}\mspace{11mu} {\sum\limits_{j = 0}^{MaxTime}\left( {{K_{ij} \cdot {Conf\_ coeff}_{i}}(P)\left( {t - f} \right)} \right)}}$

The MeasureCount is the number of different types of measurements thatproduce a confidence coefficient Conf_coeff_(i)(P)(t−j) that a person Pwas detected by measurement type i at the time sample j before thepresent time. MaxTime is the number of previous epochs (sample sets)taken into consideration to determine that a person P is still in theroom. The scaling coefficients K_(ij) consider the quality of predictionof one particular type of measurement and its (usually) non-increasingimpact over time. The types of measurement include voice recognition,face recognition, side recognition, body shape recognition, gaitdetection, etc. Finally, the calculated value of the function f(P,t) isa number representing the probability that a person P is in the room atthe time t.

These image and sound based measurements can be further expanded byrecognition based on detecting cellular devices in the room, smartwatches and personal health trackers, among other things. This detectionis done using the devices long range and short range communicationscircuits, 106 and 108, respectively. In general any device that can beworn by a person and which produces a signature that can be identifiedby any of the disclosed device's electronic circuits, can be detectedand included in the recognition analysis.

The outcome of the formula needs to be calculated for all potentiallydetected persons P in the room. For example, if all detection algorithmsresult in at least one algorithm recognizing a person within the mostrecent MaxTime number of epochs, the formula f(P,t) is calculated forthat person.

In the last step, the formula f(P,t) is compared against two thresholdvalues to determine that a person P is really in the room at the time t,or that an unknown person is in the room, or that there is insufficientdata to determine that any person is in the room, as explained below.

The above formula may be then further aggregated to account for changesin the occupancy of the room over time. When it is determined that thereare no people in the room, the sensor can be optionally put into a sleepmode to conserve energy. The sensor may be woken up from the sleep modeeither when a PIR sensor activation is detected, or a sound is heard ofsufficient volume and duration, or when a noticeable change in the imagereceived by one of the imaging sensors is detected.

The described method can be generalized in a method 800 shown in FIG. 8.The method starts at step 801 and proceeds to step 802 where allavailable data from different sensors is collected. Then, in the step803, the data is further refined by correlating readings of differentsensors. This refinement may result in changes in confidence levelprediction for all or some of the measurements and as a result may evenchange the outcome of the recognition. The method then proceeds to step804 where the final certainty levels for all detected persons arecalculated using the above mentioned formula and in the ensuing step 805these certainty levels are subjected to further analysis that determineswho is in the room at the current time (defined as time where then themost recent samples were taken). The determination performed in step 805can be a matter of applying a simple two threshold value test—if theformula f(P,t) returns a value below the first, lower threshold, thedetection of person P is marked as a false positive. When the calculatedvalue exceeds the first threshold, but falls below the second threshold,the person P is classified as a new person, previously unknown to thesystem. When the formula returns the value that exceeds both thresholds,the detected person P is determined to be present in the room. Themethod concludes in step 806.

It should be obvious to those skilled in the art, that the method 800 isnot the final action performed by the system. From this point on thesystem acts in a matter it is pre-programmed to. For example, a numberof system-level actions can be triggered, such as acquisition of the newperson image and voice samples to build a model for a new buildingoccupant. Application-level actions can be triggered as well, such asnotifying the system owner, system supervisor or network administratorthat an unknown person is detected, automatically sounding an alarm,prompting the person to identify himself, etc.

Another aspect of the presented invention is to eliminate the sources oferroneous data such as images on the wall, on TV, sounds played from theTV, radio, music boxes and any other sources of sounds. This isaccomplished by identifying the location of the video or audio signalover an extended period of time. If the location is practically constantover an extended period of time, and produces a unique video, infraredor sound signature, it can be classified as a Radio or Television (RTV)type transmitter and consequently eliminated from the recognition pool.

One particular category of devices that is paid special attention to arereflective surfaces, such as mirrors or highly reflective walls. Theseare identified by running a long term detection and comparing theresulting location. If it is constant, produces varying images, butproduces no sound of its own, it is classified as a mirror surface.Mirror surfaces can be excluded from the scene analysis, or included init, depending on the version of the algorithm used. Since mirrorsproduce a reflective image, that image needs to be processed differentlyfrom a non reflected image, so the decision whether to use the imagesfrom mirrors is usually driven by the estimate of computational capacityin the system. For devices where the CPU 101 includes both aconventional CPU and FPGA or high-end DSP such added complexity can behandled. For system with a more limited CPU, they are excluded.

Another potential way to identify the video source or the mirror surfaceis measuring its temperature with the optional IR imaging sensor.

It should be readily apparent to those skilled in the art that thequality of the device and network performance is a factor of thecomputational capacity of the CPU 101. While the technological progressguarantees ever increasing performance of new CPUs on the market, thenature of the calculations can be complex enough for even the mostcapable CPUs on the market today, especially when considering the costtrade-off of manufacturing the disclosed device and network of suchdevices. It is thus another feature of the presented invention to helpoptimize the performance of the used algorithms. Two of the mostcomputationally expensive components of the disclosed algorithms areface or body shape detection and recognition. The presented device makesuse of additional algorithms to minimize the false positive detection offaces and shapes that are not really human faces or human bodies, andthus falsely recognizing them later, leading to confusion and decreasedsystem reliability.

One of the algorithms used tracks the movement of the persons in theroom to determine if they are moving towards or away from the sensor. Ifthe person is determined to be moving towards the sensor, for example bytheir size increasing from one frame to another, later frame, thealgorithm uses the later picture or series of pictures to detect andrecognize the person's face and or body shape. The whole sequence offrames is used for gait detection. Similarly, the side face detectionalgorithm is triggered, when it is determined that a person is movingsideways in relation to the sensor. The body shape detection algorithmvariants can also be used when the person is moving sideways. Similarly,there exist variants of the gait detection algorithms that use side viewof the person to identify them. Any and all of these algorithms may beused in the disclosed invention. These algorithms can be furtherimproved with the presence of the optional IR imaging sensor thatdetects the specific temperature of the persons face or other bodyparts.

One more feature of the presented invention is the ability of thenetwork of hubs to self-diagnose any issues with a particularoccupancy-aware hub. The self-diagnostic relies on comparing thereadings from the adjacent network hubs with that of its own andmeasuring its deviation from the readings of other sensors. Thisspecifically applies to the temperature sensors, humidity sensors,microphones and optional IR imaging sensors. If the deviationcontinuously increases over an extended, predefined duration of time,the sensor is flagged as potentially malfunctioning and the systemsupervisor or the network administrator is notified by the networkoccupancy controller 460.

Those skilled in the art to which this application relates willappreciate that other and further additions, deletions, substitutionsand modifications may be made to the described embodiments.

I claim:
 1. A communicating network system for detecting and trackingoccupancy of a building comprising: first communicating detection deviceable to detect a person in the room it is located in, secondcommunicating aggregation device collecting the data from at least onesaid detection device, running the system occupancy tracking applicationand sending the processed occupancy data out to other devices.
 2. Thenetwork system as recited in claim 1 further comprising a third deviceable to detect a person in the room it is located in.
 3. The networksystem as recited in claim 1 wherein the first communicating device is adetection and identification device and is able to detect the identityof a person.
 4. The network system as recited in claim 2 wherein saidfirst and second devices are implemented as one physical device.
 5. Thenetwork system as recited in claim 3 further comprising an applicationserver.
 6. The network system as recited in claim 3 further equipped tocommunicate with a server running an attendance tracking application forthe purposes of registering the time of entry and exit to and from thebuilding for each known building occupant.
 7. The network system asrecited in claim 5 wherein the said application server is a remoteserver.
 8. The network system as recited in claim 7 wherein the saidremote server provides application programming interface for use byother devices or servers.
 9. The network system as recited in claim 1wherein the said devices use wireless communication compatible with oneof the IEEE 802.11 family of standards.
 10. The network system asrecited in claim 1 wherein the said devices use wired communication. 11.The network system as recited in claim 1 further including at least onewireless network hub device equipped to communicate using at least onewireless short range communication scheme and further equipped tocommunicate using at least one long range communication scheme, said hubdevice communicating with at least one detection device on the saidnetwork system.
 12. The network system as recited in claim 11 whereinthe said short range communication scheme is based on one of theBluetooth family of standards.
 13. The network system as recited inclaim 11 wherein the said short range communication scheme is based on aBluetooth Low Energy standard.
 14. The network system as recited inclaim 11 wherein the said short range communication scheme is based onone of the IEEE 802.15.4 family of standards.
 15. The network system asrecited in claim 11 wherein the said short range communication scheme isa wired communications link.
 16. The network system as recited in claim11 wherein the said long range communication scheme is based on IEEE802.11 family of standards.
 17. The network system as recited in claim11 wherein the said long range communication scheme is a wiredcommunication based on IEEE 802.3 family of standards.
 18. The networksystem as recited in claim 11 wherein the said long range communicationscheme is a wired communication based on IEEE 1901 family of standards.19. The network system as recited in claim 3 further including at leastone wireless network hub device equipped to communicate using at leastone wireless short range communication scheme and further equipped tocommunicate using at least one long range communication scheme, said hubdevice communicating with at least one detection and identificationdevice on the said network system.
 20. The network system as recited inclaim 19 wherein the said short range communication scheme is based onone of the Bluetooth family of standards.
 21. The network system asrecited in claim 19 wherein the said short range communication scheme isbased on a Bluetooth Low Energy standard.
 22. The network system asrecited in claim 19 wherein the said long range communication scheme isbased on IEEE 802.11 family of standards.
 23. The network system asrecited in claim 19 wherein the said long range communication scheme isa wired communication based on IEEE 802.3 family of standards.
 24. Thenetwork system as recited in claim 19 wherein the said long rangecommunication scheme is a wired communication based on IEEE 1901 familyof standards.
 25. The network system as recited in claim 19 wherein saidat least one wireless network hub device and said at least one detectionand identification device are implemented in the same physical device.26. A method to install the building occupancy tracking networkinvolving: taking a set of reference pictures of a known buildingoccupant; assigning a unique user ID to each building occupant;associating the said set of pictures of a known building occupant to thesaid unique user ID; uploading this data to the occupancy networkcontroller; and mounting at least one communicating detection andidentification device in the building, setting up the said onecommunicating detection and identification device to communicate withthe said occupancy network controller.
 27. The method as recited inclaim 26 where said means to detect occupancy involve the use of imagingcamera embedded into the detection and identification device.
 28. Themethod as recited in claim 27 where the said set of reference picturesof building occupant are taken with the said mounted detection andidentification device.
 29. The method as recited in claim 27 furthercomprising a step of configuring the said occupancy tracking system tocommunicate with the attendance tracking application.
 30. The method ofinstalling a client device on the building occupancy tracking networkinvolving: a wireless network hub device receiving, over a short rangewireless communication network, from the said client device, a signalincluding unique identification of the said client device; said networkhub device relying said unique identification of said client device tothe occupancy network controller over a long range communicationnetwork; said occupancy network controller obtaining a permission fromthe system supervisor to allow the said client device on the network;said building occupancy tracking network allowing the client devicecommunication outside of the building.
 31. The method as recited inclaim 30 further comprising a step of storing the identity of the clientdevice in at least one device in the building occupancy trackingnetwork.
 32. The method as recited in claim 30 where the said obtainingof the permission from the system supervisor involves sending an emailnotification to the email address associated with the network systemsupervisor.
 33. The method as recited in claim 30 where the saidobtaining of the permission from the system supervisor involves sendinga text message notification to the mobile phone number or accountassociated with the system supervisor.
 34. The method as recited inclaim 30 where the said obtaining of the permission from the systemsupervisor involves sending a message notification to the messagingplatform account associated with the system supervisor.
 35. The methodas recited in claim 30 where the said obtaining of the permission fromthe system supervisor involves playing a voice message on any attachednetwork device in the building.
 36. The method as recited in claim 35where the said playing a voice message on the attached network device islimited to a set of rooms of the building based on the location of wherethe said client device is detected.
 37. The method as recited in claim30, further comprising a step of checking the identity of the personinstalling said client device and determining that the person is asystem supervisor.
 38. A method to install the building occupancy sensornetwork comprising: powering up a 3D mapping smart device application;walking around the building with the application running on the smartdevice; uploading the data collected by the smart device application tothe said building sensor network.
 39. A method as recited in claim 38where the uploading of the data collected by the smart deviceapplication happens in real time.
 40. A method as recited in claim 38where the uploading of the data collected by the smart deviceapplication involves the data upload through the occupancy networkcontroller.